<template>
  <div class="talk">

    <ul>
      <li v-for="talk in loveTalkList" :key="talk.id">
        {{ talk.content }}
      </li>
    </ul>

    <button @click="getTalk">获取一句话</button>
  </div>
</template>

<script lang="ts" setup>
import { useLoveTolkStore } from '@/store/loveTalk'

const {loveTalkList,getTalka} = useLoveTolkStore()
console.log(loveTalkList);


async function getTalk() {
  getTalka()
}

</script>

<style lang="scss" scoped>
.talk {
  background-color: pink;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px;
}
</style>
